package cn.hqc.basic.utils;


import cn.hqc.basic.jwt.UserInfo;

public class ThreadLocalUtil {

    public static ThreadLocal<UserInfo> threadLocal = new ThreadLocal<>();

    // 存数据
    public static void set(UserInfo userInfo) {
        threadLocal.set(userInfo);
    }

    // 取数据
    public static UserInfo get() {
        return threadLocal.get();
    }

    // 删除
    public static void remove() {
        threadLocal.remove();
    }
}
